<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="PaisCreateDlg" widgetVar="PaisCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="CREAR PAIS">
            <h:form id="PaisCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{paisController.selected != null}">
                        <p:outputLabel value="NOMBRE DEL PAIS" for="nombre" />
                        <p:inputText id="nombre" value="#{paisController.selected.nombre}" 
                                     title="NOMBRE DEL PAIS" 
                                     required="true" 
                                     requiredMessage="NOMBRE DEL PAIS REQUERIDO"/>
                        <p:outputLabel value="ELIMINADO" for="eliminado" />
                        <p:selectBooleanCheckbox id="eliminado" 
                                                 value="#{paisController.selected.eliminado}" 
                                                 required="true" 
                                                 requiredMessage="ELIMINACION REQUERIDA"/>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{paisController.create}" value="#{bundle.Save}" update="display,:PaisListForm:datalist,:growl" oncomplete="handleSubmit(args,'PaisCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="PaisCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
